﻿<local:DocumentBase x:Class="WPFExcelReport.YCAEKAPPR"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:fd="clr-namespace:Labs.Filtering;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:wep="clr-namespace:WPFExcelReport"
                    Height="700" Width="1024" 
                    FontSize="12"
                    Loaded="Window_Loaded"
                    Background="White"
                    Title="YCAEKAPPR"  
     >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <ucd:TextTrimmingConverter  x:Key="Trim"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <CollectionViewSource   x:Key="vwLIEFDAT" Source="{Binding Path=LIEFDAT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKKOPF" Source="{Binding Path=EKKOPF,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKVRECH" Source="{Binding Path=EKVRECH,Source={StaticResource Set4ITX}}" />
        <CollectionViewSource   x:Key="vwTmpEKVRECH" Source="{Binding Path=EKVRECH,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwEKPOS" Source="{Binding Path=ICC_EKPOS,Source={StaticResource Set4ITX}}" />
        <CollectionViewSource   x:Key="vwWASTAMM" Source="{Binding Path=WASTAMM,Source={StaticResource Set4ITX}}" />
             
    </local:DocumentBase.Resources>
    <Grid   >
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="1*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0"></ColumnDefinition>
            <ColumnDefinition Width="1200"></ColumnDefinition>          
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="1" Orientation="Horizontal" >
            <TextBlock FontSize="18"    Height="40" Width="Auto" Name="txt1" 
                       VerticalAlignment="Center"  Margin="0,0,0,0"  Text="采购单" />
            <TextBox Background="Yellow"  FontSize="18"    Width="50" Name="txtABPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0"
                     MaxLength="2" />
            <TextBox Background="Pink" BorderBrush="Azure"  FontSize="18"    Margin="10,0,0,0" Width="102" Name="txtABPAUFLFD"  
                     MaxLength="6" />
                <!--<ComboBox  ItemsSource="{Binding Source={StaticResource ResourceKey=vwLIEFDAT}}"
                            Margin="20,0,0,0"
                       Background="Gray"  MinWidth="100" 
                       DisplayMemberPath="LSLIEFNA"
                       IsEditable="True"
                       SelectedValuePath="LSLIEFNR"
                       >
            </ComboBox>-->            
            <TextBlock VerticalAlignment="Center" Margin="20,0,0,0">请款</TextBlock>
            <CheckBox Name="ChkEKPBEKZ" IsChecked="True" VerticalAlignment="Center" 
                          Background="White"
                          >
                <CheckBox.LayoutTransform>
                    <ScaleTransform ScaleX="2" ScaleY="2" />
                </CheckBox.LayoutTransform>
            </CheckBox>
            <TextBlock VerticalAlignment="Center">核对</TextBlock>
            <CheckBox Name="ChkEKPKNTRNRL" IsChecked="False" VerticalAlignment="Center" 
                          Background="White"
                          >
                <CheckBox.LayoutTransform>
                    <ScaleTransform ScaleX="2" ScaleY="2" />
                </CheckBox.LayoutTransform>
            </CheckBox>
            <Button FontSize="18" Content="查询"  BorderBrush="Yellow" Margin="20,0,0,0" Name="butGetData" Click="btnQuery_Click" Height="40" Width="52"/>
            <!--<Button Content="打印"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"  Name="btnPrint" Width="Auto" Click="btnPrint_Click"/>-->
            <Button Name="btnApprove"  FontSize="18" Click="btnApprove_Click" Margin="10,0,0,0" Height="40" Width="51" VerticalAlignment="Top" Content="审批"/>
               
            <Button Content="取消审核"  FontSize="18"  BorderBrush="Yellow" Margin="20,0,0,0"  Name="btnCANCEL" Width="86" Click="btnCANCEL_Click"/>
            <!--<Button Content="预览"  FontSize="18"   BorderBrush="Yellow" Margin="20,0,0,0"  Name="btnPrintPreview" Width="Auto" Click="btnPrintPreview_Click"/>-->
        </StackPanel>
        <!--DataGrid Grid.Row="1" Grid.Column="0" CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKKOPF}}" 
                              Margin="0,1,0,0" >
            <DataGrid.Columns>
                <DataGridTextColumn Header="" Binding="{Binding EKKAUFKRS}" Width="40"/>
                <DataGridTextColumn Header="采购单" Binding="{Binding EKKAUFLFD}" Width="80"/>
            </DataGrid.Columns>
        </DataGrid  -->
        <DockPanel Grid.Row="1" Grid.Column="1" Margin="0,0,200,0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="1*" />
                    <RowDefinition Height="1*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="1*"></ColumnDefinition>
                    <ColumnDefinition Width="1*"/>
                </Grid.ColumnDefinitions>
                <StackPanel  Grid.Row="1"
                    Grid.Column="0" Grid.ColumnSpan="2"  > 
                    <DataGrid Name="dlgEKVRECH"  
                    CanUserReorderColumns="True"  
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected"  MaxHeight="200"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" 
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKVRECH}}"  
                               >
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="申请号" Binding="{Binding EKVABLAGE}" Width="40"/>
                            <DataGridTextColumn Header="" Binding="{Binding EKVBELEG,Converter={StaticResource ResourceKey=pnum}}" Width="40"/>
                            <DataGridTextColumn Header="金额" Binding="{Binding EKVBETRAG,Converter={StaticResource ResourceKey=d100}}" Width="60"/>
                            <DataGridTextColumn Header="采购单" Binding="{Binding EKVFILLER,Converter={StaticResource ResourceKey=Trim}}" Width="120"/>
                            <DataGridTextColumn Header="次数" Binding="{Binding EKVAENDZL}" Width="30"/>
                            <DataGridTextColumn Header="申请日期" Binding="{Binding Path=EKVNEUDAT}" Width="60"/>
                            <DataGridTextColumn Header="申请" Binding="{Binding Path=EKVNEUBEN}" Width="40"/>
                            <DataGridTextColumn Header="付款日期" Binding="{Binding Path=EKVAENDDAT}" Width="60"/>
                            <DataGridTextColumn Header="付款人" Binding="{Binding Path=EKVAENDBEN}" Width="40"/>
                            <DataGridTextColumn Header="付款" Binding="{Binding EKVKIR}" Width="40"/>
                        </DataGrid.Columns>
                    </DataGrid  >
                    <DataGrid Name="dlgTmpEKVRECH"  IsEnabled="False"
                    CanUserReorderColumns="True"  
                              
                              CanUserResizeRows="True" CanUserSortColumns="True"                  
                              AutoGenerateColumns="False"   
                              EnableRowVirtualization="True"  
                              RowDetailsVisibilityMode="VisibleWhenSelected"  MaxHeight="200"
                              IsSynchronizedWithCurrentItem="True" Opacity="10" 
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwTmpEKVRECH}}"  
                               >
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="申请号" Binding="{Binding EKVABLAGE}" Width="40"/>
                            <DataGridTextColumn Header="" Binding="{Binding EKVBELEG,Converter={StaticResource ResourceKey=pnum}}" Width="40"/>
                            <DataGridTextColumn Header="金额" Binding="{Binding EKVBETRAG,Converter={StaticResource ResourceKey=d100}}" Width="60"/>
                            <DataGridTextColumn Header="采购单" Binding="{Binding EKVFILLER,Converter={StaticResource ResourceKey=Trim}}" Width="120"/>
                            <DataGridTextColumn Header="次数" Binding="{Binding EKVAENDZL}" Width="30"/>
                            <DataGridTextColumn Header="申请日期" Binding="{Binding Path=EKVNEUDAT}" Width="60"/>
                            <DataGridTextColumn Header="申请" Binding="{Binding Path=EKVNEUBEN}" Width="40"/>
                            <DataGridTextColumn Header="付款日期" Binding="{Binding Path=EKVAENDDAT}" Width="60"/>
                            <DataGridTextColumn Header="付款人" Binding="{Binding Path=EKVAENDBEN}" Width="40"/>
                            <DataGridTextColumn Header="付款" Binding="{Binding EKVKIR}" Width="40"/>
                        </DataGrid.Columns>
                    </DataGrid  >
                </StackPanel>
            </Grid>
        </DockPanel>
        <DataGrid CanUserReorderColumns="True" CanUserResizeRows="True" CanUserSortColumns="True" AutoGenerateColumns="False"
                  EnableRowVirtualization="True" RowDetailsVisibilityMode="VisibleWhenSelected" 
                  HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsSynchronizedWithCurrentItem="True" 
                  Opacity="10" Visibility="Visible" ItemsSource="{Binding Source={StaticResource ResourceKey=vwEKPOS}}" 
                  Grid.Column="1" Margin="1,0,199,330" Grid.Row="1">
            <DataGrid.Columns>
                <!--<DataGridTextColumn Header="" Binding="{Binding EKPAUFKRS}" Width="40"/>
                        <DataGridTextColumn Header="采购单" Binding="{Binding EKPAUFLFD}" Width="80"/>
                        <DataGridTextColumn Header="" Binding="{Binding EKPAUFPOS}" Width="40"/>
                        <DataGridTextColumn Header="品种" Binding="{Binding EKPART}" Width="160"/>
                        <DataGridTextColumn Header="色号" Binding="{Binding EKPFARBE}" Width="80"/>
                        <DataGridTextColumn Header="尺寸" Binding="{Binding EKPGROE}" Width="80"/>
                        <DataGridTextColumn Header="数量" Binding="{Binding Path=EKPME1, Converter={StaticResource ResourceKey=d100}}" Width="80"/>
                        <DataGridTextColumn Header="单价" Binding="{Binding Path=EKPPRME, Converter={StaticResource ResourceKey=d1000}}" Width="80"/>
                        <DataGridTextColumn Header="交期" Binding="{Binding EKPLTERM}" Width="80"/>-->
                <DataGridTextColumn Header="审核日期" Binding="{Binding EKPKNTRNRL}" Width="80" />
                <DataGridTextColumn Header="" Binding="{Binding EKPAUFKRS}" Width="40" />
                <DataGridTextColumn Header="采购单" Binding="{Binding EKPAUFLFD}" Width="80" />
                <DataGridTextColumn Header="" Binding="{Binding EKPAUFPOS}" Width="40" />
                <DataGridTextColumn Header="品种" Binding="{Binding EKPART}" Width="120" />
                <DataGridTextColumn Header="色号" Binding="{Binding EKPFARBE}" Width="60" />
                <DataGridTextColumn Header="尺寸" Binding="{Binding EKPGROE}" Width="60" />
                <DataGridTextColumn Header="数量" Binding="{Binding Path=EKPME1, Converter={StaticResource ResourceKey=d100}}" Width="80" />
                <DataGridTextColumn Header="单价" Binding="{Binding Path=EKPPRME, Converter={StaticResource ResourceKey=d1000}}" Width="80" />
                <DataGridTextColumn Header="交期" Binding="{Binding EKPLTERM}" Width="80" />
                <DataGridTextColumn Header="附加费" Binding="{Binding EKPZUABWERT, Converter={StaticResource ResourceKey=d100}}" Width="60" />
            </DataGrid.Columns>
        </DataGrid  >
    </Grid>
</local:DocumentBase>
